/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'
import ModuleLayout from '@/layout/module'

const liveRouter = {
  path: '/live',
  component: Layout,
  redirect: '/live/default',
  name: 'Live',
  meta: {
    title: '直播',
    icon: 'live',
    roles: ['admin']
  },
  children: [
    {
      path: '/live/default',
      redirect: '/live/default/index',
      component: ModuleLayout,
      name: 'liveIndex',
      meta: {
        title: '直播列表',
        icon: 'em-icon-live'
      },
      children: [
        {
          path: '/live/default/index',
          component: () => import('@/views/live/default/index'),
          meta: {
            title: '列表',
            keepAlive: true
          },
          hidden: true
        },
        {
          path: '/live/default/view/:id',
          component: () => import('@/views/live/default/view'),
          name: 'live/default/view/:id',
          meta: {
            title: '详情'
          },
          hidden: true
        }
      ]
    },
    {
      path: '/live/setting',
      redirect: '/live/setting/app',
      component: ModuleLayout,
      meta: {
        title: '应用设置',
        icon: 'em-icon-sponsor'
      },
      children: [
        {
          path: '/live/setting/index',
          component: () => import('@/views/live/setting/index'),
          meta: {
            title: '基础设置',
            keepAlive: true
          },
          hidden: true
        },
        {
          path: '/live/setting/stream',
          component: () => import('@/views/live/setting/stream'),
          meta: {
            title: '流设置'
          },
          hidden: true
        },
        {
          path: '/live/setting/domain',
          component: () => import('@/views/live/setting/domain'),
          meta: {
            title: '域名设置'
          },
          hidden: true
        }
      ]
    }
  ]
}
export default liveRouter
